package com.netblizzard.nms.util.database;

import java.io.IOException;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeansException;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.netblizzard.nms.collect.MainServer;

public final class SpringUtil {
	private static ApplicationContext ctx = null;

	public static void init(String xmlFile) throws IOException {
		ctx = new ClassPathXmlApplicationContext(xmlFile);
	}

	public static Object getBean(String beanName) {
		return ctx.getBean(beanName);
	}
}
